<?php
/**
 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
 * @license		GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * See COPYRIGHT.php for copyright notices and details.
 *
 * NRHC Template v2.0
 * HTML5 / CSS3
 * Sep 2011
 */

// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

include_once (dirname(__FILE__).DS.'/nrhc_load.php');
?>
<!DOCTYPE html>
<html lang="<?php echo $this->language; ?>">

<head>
	<meta charset="utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
	<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> 

	<jdoc:include type="head" />

	<!-- Introduce older browsers to HTML5 elements -->
	<!--[if IE]>
	<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
	<![endif]-->

	<!-- Make IE behave like standards-compliant browser -->
	<!--[if lt IE 9]>
	<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
	<![endif]-->

	<!-- Google Analytics code (at the top so that custom pageLinks are tracked)
	<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-11629380-1"); pageTracker._trackPageview(); } catch(err) {}</script>
  -->

  <!-- DEVELOPMENT ONLY: remove for publishing -->
	<link rel="stylesheet/less" type="text/css" href="<?php echo $nrhc->templateurl() ?>/css/base.less" media="all">
  <script type="text/javascript" src="<?= $nrhc->templateurl() ?>/js/less-1.1.5.min.js"></script>
  <script type="text/javascript">less.watch();</script>
  <!-- end development -->

</head>

<body class="nrhc <?php echo $nrhc->browser(); ?> no-js">

<div id="top"></div>
<header id="global-header" class="globalwidth">

	<?php if($this->countModules('above-all')) : ?>
	<section id="above-top">
		<jdoc:include type="modules" name="above-all" />
	</section><!-- /#above-top -->
	<?php endif; ?>
	<h1 id="logo">
		<a href="<?php echo $this->baseurl ?>" title="<?php echo $nrhc->sitename(); ?>">
			<span><?php echo $nrhc->sitename(); ?></span>
		</a>
	</h1><!-- /#logo -->
  <a href="#" id="global-nav-expand">Expand Icon</a>
	<nav id="global-nav">
		<jdoc:include type="modules" name="nrhc-top-menu" />
	</nav><!-- /#global-nav -->
	<section id="global-search">
		<jdoc:include type="modules" name="nrhc-search" />
	</section><!-- /.search -->

</header>
<!-- /#global-header -->

<?php if($this->countModules('nrhc-above-top or nrhc-crown or message')) : ?>
<section id="crown" class="globalwidth">
	<?php if( $this->countModules('nrhc-above-top')): ?>
	<div id="top">
		<jdoc:include type="modules" name="nrhc-above-top" />
	</div><!-- /#top -->
	<?php endif; ?>

	<jdoc:include type="modules" name="nrhc-crown" style="xhtml" />

	<div id="message">
		<jdoc:include type="message" />
	</div><!-- /#message -->
</section>
<!-- /#crown -->
<?php endif; ?>

<section id="cms" class="globalwidth">

	<?php if($this->countModules('left')) : ?>
	<section id="left" class="rounded shadow">
		<jdoc:include type="modules" name="left" style="xhtml" />
	</section><!-- /#left -->
	<?php endif; ?>

	<section id="content" class="<?php echo $nrhc->getWithContent(); ?> rounded shadow">

		<?php if($this->countModules('content-header')) : ?>
		<header>
			<jdoc:include type="modules" name="content-header" style="xhtml" />
		</header>
		<?php endif; ?> 

		<jdoc:include type="component" />

		<?php if($this->countModules('content-footer')) : ?>
		<footer>
			<jdoc:include type="modules" name="content-footer" style="xhtml" />
		</footer>
		<?php endif; ?>

	</section><!-- #content -->

	<?php if($this->countModules('right')) : ?>
	<section id="right" class="rounded shadow">
		<jdoc:include type="modules" name="right" style="xhtml" />
	</section><!-- /#right -->
	<?php endif; ?>

	<?php if($this->countModules('after-content')) : ?>
	<section id="after-content" class="clear">
		<jdoc:include type="modules" name="after-content" style="xhtml" />
	</section><!-- /#after-content -->
	<?php endif; ?>
	
</section>
<!-- /#cms -->

<?php if( $this->countModules('nrhc-footer1 or nrhc-footer2 or nrhc-footer3 or nrhc-footer4 or breadcrumb')) : ?>
<section id="page-footer" class="globalwidth rounded shadow">
	<div class="fourcolumns">
		<div class="column">
			<div class="inside">
			<?php if($this->countModules('nrhc-footer1')) : ?>
			<jdoc:include type="modules" name="nrhc-footer1" style="xhtml" />
			<?php endif; ?>
			</div>
		</div>
		<div class="column">
			<div class="inside">
			<?php if($this->countModules('nrhc-footer2')) : ?>
			<jdoc:include type="modules" name="nrhc-footer2" style="xhtml" />
			<?php endif; ?>
			</div>
		</div>
		<div class="column">
			<div class="inside">
			<?php if($this->countModules('nrhc-footer3')) : ?>
			<jdoc:include type="modules" name="nrhc-footer3" style="xhtml" />
			<?php endif; ?>
			</div>
		</div>
		<div class="column last">
			<div class="inside">
			<jdoc:include type="modules" name="nrhc-footer4" style="xhtml" />
			</div>
		</div>
	</div>
	<!-- /.fourcolumns -->

	<?php if(!$nrhc->isFrontPage() && $this->countModules('breadcrumb')) : ?>
	<section id="breadcrumb" class="rounded">
		<jdoc:include type="modules" name="breadcrumb" style="xhtml" />
	</section>
	<!-- /#breadcrumb -->
	<?php endif; ?>

</section>
<!-- /#page-footer -->
<?php endif; ?>

<footer id="global-footer" class="globalwidth">
	<jdoc:include type="modules" name="footer" style="xhtml" />
</footer>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
<script>!window.jQuery && document.write('<script src="<?php echo $nrhc->templateurl() ?>/js/jquery-1.6.3.min.js"><\/script>')</script> 
<script src="<?php echo $nrhc->templateurl() ?>/js/jquery.hoverIntent.minified.js?v=1"></script>
<script src="<?php echo $nrhc->templateurl() ?>/js/nrhcTemplateSpice.js?v=1"></script>

<section id="overlays">
	<jdoc:include type="modules" name="overlays" />
</section>

<section id="debug">
	<jdoc:include type="modules" name="debug" />
</section>

</body>
</html>
